/*
 * Copyright (c) 2011, Ben Lavery
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without modification,
 * are permitted provided that the following conditions are met:
 *
 * - Redistributions of source code must retain the above copyright notice, this
 * list of conditions and the following disclaimer.
 * - Redistributions in binary form must reproduce the above copyright notice,
 * this list of conditions and the following disclaimer in the documentation
 * and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */

package GUI;
import GUI.MainFrame;
import Main.Controller;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPasswordField;
import javax.swing.JSlider;
import javax.swing.JSpinner;
import javax.swing.JTextArea;
import javax.swing.JTextField;
/**
 *
 * @author benlavery
 */
public class MainFrame extends javax.swing.JFrame {

    private Controller controller;

    /** Creates new form MainFrame */
    public MainFrame() {
        initComponents();
    }

    public void setController(Controller c){
        controller = c;
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        tabAllTabs = new javax.swing.JTabbedPane();
        tabGamePlay = new javax.swing.JPanel();
        cmbGameStyle = new javax.swing.JComboBox();
        lblGameStyle = new javax.swing.JLabel();
        lblMaxShots = new javax.swing.JLabel();
        chkRicochet = new javax.swing.JCheckBox();
        chkJumping = new javax.swing.JCheckBox();
        chkSpawnOnBuilding = new javax.swing.JCheckBox();
        chkDieOnTeamKill = new javax.swing.JCheckBox();
        lblMaxTeamKills = new javax.swing.JLabel();
        chkDisableBots = new javax.swing.JCheckBox();
        lblMaxPlayerScore = new javax.swing.JLabel();
        lblMaxTeamScore = new javax.swing.JLabel();
        lblGameTime = new javax.swing.JLabel();
        chkManuallyStartTimedGame = new javax.swing.JCheckBox();
        chkAutoTeam = new javax.swing.JCheckBox();
        lblMaxPlayers = new javax.swing.JLabel();
        spnMaxShots = new javax.swing.JSpinner();
        spnMaxTeamKills = new javax.swing.JSpinner();
        spnMaxPlayerScore = new javax.swing.JSpinner();
        spnMaxTeamScore = new javax.swing.JSpinner();
        spnGameTime = new javax.swing.JSpinner();
        spnMaxPlayers = new javax.swing.JSpinner();
        lblWorldSize = new javax.swing.JLabel();
        spnWorldSize = new javax.swing.JSpinner();
        lblBuildingDensity = new javax.swing.JLabel();
        spnBuildingDensity = new javax.swing.JSpinner();
        lblMap = new javax.swing.JLabel();
        chkRandomWorld = new javax.swing.JCheckBox();
        cmbMaps = new javax.swing.JComboBox();
        chkRandomHeightBuildings = new javax.swing.JCheckBox();
        chkRandomRotateObjects = new javax.swing.JCheckBox();
        chkAddTeleporters = new javax.swing.JCheckBox();
        jSeparator2 = new javax.swing.JSeparator();
        passAdminPassword = new javax.swing.JPasswordField();
        passConfirmAdminPassword = new javax.swing.JPasswordField();
        lblAdminPassword = new javax.swing.JLabel();
        lblConfirmAdminPassword = new javax.swing.JLabel();
        chkAnnounceTKToAdmins = new javax.swing.JCheckBox();
        txtPathToBadWords = new javax.swing.JTextField();
        lblPathToBadWords = new javax.swing.JLabel();
        chkFilterChat = new javax.swing.JCheckBox();
        chkFilterChatSimple = new javax.swing.JCheckBox();
        chkFilterCallSigns = new javax.swing.JCheckBox();
        tabServer = new javax.swing.JPanel();
        chkQuiteAfterOneGame = new javax.swing.JCheckBox();
        txtPublicMessage = new javax.swing.JTextField();
        lblPublicMessage = new javax.swing.JLabel();
        lblPublicAddress = new javax.swing.JLabel();
        txtPublicAddress = new javax.swing.JTextField();
        txtListeningPort = new javax.swing.JTextField();
        lblListeningPort = new javax.swing.JLabel();
        chkMakeServerPrivate = new javax.swing.JCheckBox();
        lblListeningAddress = new javax.swing.JLabel();
        txtListeningAddress = new javax.swing.JTextField();
        chkRequireUDP = new javax.swing.JCheckBox();
        txtPathToPasswordDatabase = new javax.swing.JTextField();
        lblPathToPasswordDatabase = new javax.swing.JLabel();
        txtPathToUserDatabase = new javax.swing.JTextField();
        lblPathToUserDatabase = new javax.swing.JLabel();
        txtPathToGroupDatabase = new javax.swing.JTextField();
        lblPathToGroupDatabase = new javax.swing.JLabel();
        lblRegisteredGroupName = new javax.swing.JLabel();
        txtRegisteredGroupName = new javax.swing.JTextField();
        spnMaxIdleTime = new javax.swing.JSpinner();
        lblMaxIdleTime = new javax.swing.JLabel();
        lblAdminAnnounceLag = new javax.swing.JLabel();
        spnAdminAnnounceLag = new javax.swing.JSpinner();
        spnAnnounceLag = new javax.swing.JSpinner();
        lblAnnounceLag = new javax.swing.JLabel();
        lblKickPlayerAfterLag = new javax.swing.JLabel();
        spnKickPlayerAfterLag = new javax.swing.JSpinner();
        lblPathToBanFile = new javax.swing.JLabel();
        txtPathToBanFile = new javax.swing.JTextField();
        txtBanAddresses = new javax.swing.JTextField();
        lblBanAddresses = new javax.swing.JLabel();
        lblPathToPIDFile = new javax.swing.JLabel();
        txtPathToPIDFile = new javax.swing.JTextField();
        lblWelcomeMessage = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        txtWelcomeMessage = new javax.swing.JTextArea();
        jScrollPane2 = new javax.swing.JScrollPane();
        txtBroadcastMessage = new javax.swing.JTextArea();
        lblBroadcastMessage = new javax.swing.JLabel();
        spnSpamTime = new javax.swing.JSpinner();
        lblSpamTime = new javax.swing.JLabel();
        chkSyncTimeWithServer = new javax.swing.JCheckBox();
        lblInertiaX = new javax.swing.JLabel();
        lblInertiaY = new javax.swing.JLabel();
        sldDebugLevel = new javax.swing.JSlider();
        lblDebugLevel = new javax.swing.JLabel();
        spnInertiaX = new javax.swing.JSpinner();
        spnInertiaY = new javax.swing.JSpinner();
        chkPrintScoreToConsole = new javax.swing.JCheckBox();
        chkAddTimestampToLog = new javax.swing.JCheckBox();
        tabFlags = new javax.swing.JPanel();
        chkFlagsOnBuildings = new javax.swing.JCheckBox();
        chkAntidoteFlags = new javax.swing.JCheckBox();
        lblGoodFlags = new javax.swing.JLabel();
        lblAgility = new javax.swing.JLabel();
        spnAgility = new javax.swing.JSpinner();
        spnCloaking = new javax.swing.JSpinner();
        lblCloaking = new javax.swing.JLabel();
        spnRapidFire = new javax.swing.JSpinner();
        lblRapiFire = new javax.swing.JLabel();
        spnGenocide = new javax.swing.JSpinner();
        lblGenocide = new javax.swing.JLabel();
        spnGuidedMissile = new javax.swing.JSpinner();
        lblGuidedMissile = new javax.swing.JLabel();
        spnInvisibleBullet = new javax.swing.JSpinner();
        lblInvisibleBullet = new javax.swing.JLabel();
        spnLaser = new javax.swing.JSpinner();
        lblLaser = new javax.swing.JLabel();
        spnMachineGun = new javax.swing.JSpinner();
        lblMachineGun = new javax.swing.JLabel();
        spnNarrow = new javax.swing.JSpinner();
        lblNarrow = new javax.swing.JLabel();
        spnOscillationOverthruster = new javax.swing.JSpinner();
        lblOscillationOverthruster = new javax.swing.JLabel();
        spnPhantomZone = new javax.swing.JSpinner();
        lblPhantomZone = new javax.swing.JLabel();
        spnQuickturn = new javax.swing.JSpinner();
        lblQuickTurn = new javax.swing.JLabel();
        spnSuperBullet = new javax.swing.JSpinner();
        lblSuperBullet = new javax.swing.JLabel();
        spnSeer = new javax.swing.JSpinner();
        lblSeer = new javax.swing.JLabel();
        spnSheild = new javax.swing.JSpinner();
        lblShield = new javax.swing.JLabel();
        spnSteamroller = new javax.swing.JSpinner();
        lblSteamroller = new javax.swing.JLabel();
        spnStealth = new javax.swing.JSpinner();
        lblStealth = new javax.swing.JLabel();
        spnShockwave = new javax.swing.JSpinner();
        lblShockwave = new javax.swing.JLabel();
        spnTiny = new javax.swing.JSpinner();
        lblTiny = new javax.swing.JLabel();
        spnTheif = new javax.swing.JSpinner();
        lblTheif = new javax.swing.JLabel();
        spnUseless = new javax.swing.JSpinner();
        lblUseless = new javax.swing.JLabel();
        spnHighSpeed = new javax.swing.JSpinner();
        lblHighSpeed = new javax.swing.JLabel();
        spnWings = new javax.swing.JSpinner();
        lblWings = new javax.swing.JLabel();
        chkAllBadFlagsOn = new javax.swing.JCheckBox();
        lblBlindness = new javax.swing.JLabel();
        spnBlindness = new javax.swing.JSpinner();
        spnBouncy = new javax.swing.JSpinner();
        lblBouncy = new javax.swing.JLabel();
        spnColourBlindness = new javax.swing.JSpinner();
        lblColourBlindness = new javax.swing.JLabel();
        spnForwardOnly = new javax.swing.JSpinner();
        lblForwardOnly = new javax.swing.JLabel();
        spnJamming = new javax.swing.JSpinner();
        lblJamming = new javax.swing.JLabel();
        spnLeftTurnOnly = new javax.swing.JSpinner();
        lblLeftTurnOnly = new javax.swing.JLabel();
        spnMomentum = new javax.swing.JSpinner();
        lblMomentum = new javax.swing.JLabel();
        spnNoJumping = new javax.swing.JSpinner();
        lblNoJumping = new javax.swing.JLabel();
        spnObesity = new javax.swing.JSpinner();
        lblObesity = new javax.swing.JLabel();
        spnReverseControlls = new javax.swing.JSpinner();
        lblReverseControlls = new javax.swing.JLabel();
        spnReverseOnly = new javax.swing.JSpinner();
        lblReverseOnly = new javax.swing.JLabel();
        spnRightTurnOnly = new javax.swing.JSpinner();
        lblRightTurnOnly = new javax.swing.JLabel();
        spnTriggerHappy = new javax.swing.JSpinner();
        lblTriggerHappy = new javax.swing.JLabel();
        spnWideAngle = new javax.swing.JSpinner();
        lblWideAngle = new javax.swing.JLabel();
        lblGoodFlags1 = new javax.swing.JLabel();
        chkAllGoodFlagsOn = new javax.swing.JCheckBox();
        spnExtraFlags = new javax.swing.JSpinner();
        lblExtraFlags = new javax.swing.JLabel();
        spnNumberOfFlags = new javax.swing.JSpinner();
        lblNumberOfFlags = new javax.swing.JLabel();
        jSeparator1 = new javax.swing.JSeparator();
        spnJumpingFlag = new javax.swing.JSpinner();
        lblJumpingFlag = new javax.swing.JLabel();
        spnRicochetingFlag = new javax.swing.JSpinner();
        lblRicochetingFlag = new javax.swing.JLabel();
        btnLaunchServer = new javax.swing.JButton();
        btnImportSettings = new javax.swing.JButton();
        btnExportSettings = new javax.swing.JButton();
        btnKillServer = new javax.swing.JButton();
        lblVersion = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("BZFlag Server GUI");
        setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        setResizable(false);
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowClosed(java.awt.event.WindowEvent evt) {
                formWindowClosed(evt);
            }
        });

        tabAllTabs.setAutoscrolls(true);

        tabGamePlay.setAutoscrolls(true);
        tabGamePlay.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        cmbGameStyle.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Free for all", "Capture the flag", "Rabbit based on score", "Rabbit based on killer", "Rabbit random" }));
        cmbGameStyle.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmbGameStyleActionPerformed(evt);
            }
        });
        tabGamePlay.add(cmbGameStyle, new org.netbeans.lib.awtextra.AbsoluteConstraints(94, 17, -1, -1));

        lblGameStyle.setText("Game Style");
        tabGamePlay.add(lblGameStyle, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 22, -1, -1));

        lblMaxShots.setLabelFor(spnMaxShots);
        lblMaxShots.setText("Max. Shots before reload");
        tabGamePlay.add(lblMaxShots, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 60, -1, -1));

        chkRicochet.setText("Allow shots to ricochet");
        chkRicochet.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                chkRicochetActionPerformed(evt);
            }
        });
        tabGamePlay.add(chkRicochet, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 20, -1, -1));

        chkJumping.setText("Allow jumping");
        chkJumping.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                chkJumpingActionPerformed(evt);
            }
        });
        tabGamePlay.add(chkJumping, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 40, -1, -1));

        chkSpawnOnBuilding.setText("Spawn tanks on buildings");
        tabGamePlay.add(chkSpawnOnBuilding, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 60, -1, -1));

        chkDieOnTeamKill.setSelected(true);
        chkDieOnTeamKill.setText("Die on team kill");
        tabGamePlay.add(chkDieOnTeamKill, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 90, -1, -1));

        lblMaxTeamKills.setText("Kick on percentage of team kills");
        tabGamePlay.add(lblMaxTeamKills, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 90, -1, -1));

        chkDisableBots.setText("Disable bots");
        tabGamePlay.add(chkDisableBots, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 110, -1, -1));

        lblMaxPlayerScore.setText("Max player score");
        tabGamePlay.add(lblMaxPlayerScore, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 120, -1, -1));

        lblMaxTeamScore.setText("Max team score");
        tabGamePlay.add(lblMaxTeamScore, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 150, -1, -1));

        lblGameTime.setText("Game time limit (in seconds)");
        tabGamePlay.add(lblGameTime, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 180, -1, -1));

        chkManuallyStartTimedGame.setText("Manually start timed game");
        tabGamePlay.add(chkManuallyStartTimedGame, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 130, -1, -1));

        chkAutoTeam.setSelected(true);
        chkAutoTeam.setText("Auto-team");
        tabGamePlay.add(chkAutoTeam, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 150, -1, -1));

        lblMaxPlayers.setText("Max number of players");
        tabGamePlay.add(lblMaxPlayers, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 210, -1, -1));

        spnMaxShots.setModel(new javax.swing.SpinnerNumberModel(5, 1, 50, 1));
        tabGamePlay.add(spnMaxShots, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 50, -1, -1));

        spnMaxTeamKills.setModel(new javax.swing.SpinnerNumberModel(32, 1, 100, 1));
        tabGamePlay.add(spnMaxTeamKills, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 80, -1, -1));

        spnMaxPlayerScore.setModel(new javax.swing.SpinnerNumberModel(100, 1, 1000, 1));
        tabGamePlay.add(spnMaxPlayerScore, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 110, -1, -1));

        spnMaxTeamScore.setModel(new javax.swing.SpinnerNumberModel(250, 1, 2500, 1));
        tabGamePlay.add(spnMaxTeamScore, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 140, -1, -1));

        spnGameTime.setModel(new javax.swing.SpinnerNumberModel(3600, 60, 9999, 1));
        tabGamePlay.add(spnGameTime, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 170, -1, -1));

        spnMaxPlayers.setModel(new javax.swing.SpinnerNumberModel(12, 2, 50, 1));
        tabGamePlay.add(spnMaxPlayers, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 200, -1, -1));

        lblWorldSize.setText("World size");
        tabGamePlay.add(lblWorldSize, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 430, -1, -1));

        spnWorldSize.setModel(new javax.swing.SpinnerNumberModel(800, 10, 9990, 10));
        spnWorldSize.setEnabled(false);
        tabGamePlay.add(spnWorldSize, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 420, -1, -1));

        lblBuildingDensity.setText("Building density");
        tabGamePlay.add(lblBuildingDensity, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 400, -1, -1));

        spnBuildingDensity.setModel(new javax.swing.SpinnerNumberModel(5, 0, 10, 1));
        spnBuildingDensity.setEnabled(false);
        tabGamePlay.add(spnBuildingDensity, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 390, -1, -1));

        lblMap.setText("Map");
        tabGamePlay.add(lblMap, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 270, -1, -1));

        chkRandomWorld.setText("Generate random world");
        chkRandomWorld.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                chkRandomWorldActionPerformed(evt);
            }
        });
        tabGamePlay.add(chkRandomWorld, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 300, -1, -1));

        cmbMaps.setToolTipText("<html>\nThese maps are those placed in the \"maps\" folder located in the \"My BZFlag Files\"<br />\nwhich should be situated in the Documents folder in your home directory.<br />\n<br />\nFor example:<br />\nC:\\Documents and Settings\\My Documents\\My BZFlag Files\\maps<br />\n~/Documents/My BZFlag Files/maps\n</html>");
        tabGamePlay.add(cmbMaps, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 270, 210, -1));

        chkRandomHeightBuildings.setText("Buildings have random height");
        chkRandomHeightBuildings.setEnabled(false);
        tabGamePlay.add(chkRandomHeightBuildings, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 360, -1, -1));

        chkRandomRotateObjects.setText("Randomly rotate world objects");
        chkRandomRotateObjects.setEnabled(false);
        tabGamePlay.add(chkRandomRotateObjects, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 320, -1, -1));

        chkAddTeleporters.setText("Add teleporters");
        tabGamePlay.add(chkAddTeleporters, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 340, -1, -1));
        tabGamePlay.add(jSeparator2, new org.netbeans.lib.awtextra.AbsoluteConstraints(70, 240, 440, 10));

        passAdminPassword.setText("abcdef");
        passAdminPassword.setPreferredSize(new java.awt.Dimension(125, 28));
        tabGamePlay.add(passAdminPassword, new org.netbeans.lib.awtextra.AbsoluteConstraints(330, 270, -1, -1));

        passConfirmAdminPassword.setText("abcdef");
        passConfirmAdminPassword.setPreferredSize(new java.awt.Dimension(125, 28));
        tabGamePlay.add(passConfirmAdminPassword, new org.netbeans.lib.awtextra.AbsoluteConstraints(330, 300, -1, -1));

        lblAdminPassword.setText("Admin password");
        tabGamePlay.add(lblAdminPassword, new org.netbeans.lib.awtextra.AbsoluteConstraints(460, 280, -1, -1));

        lblConfirmAdminPassword.setText("Confirm admin password");
        tabGamePlay.add(lblConfirmAdminPassword, new org.netbeans.lib.awtextra.AbsoluteConstraints(460, 310, -1, -1));

        chkAnnounceTKToAdmins.setText("Announce team kills to admins");
        tabGamePlay.add(chkAnnounceTKToAdmins, new org.netbeans.lib.awtextra.AbsoluteConstraints(330, 420, -1, -1));

        txtPathToBadWords.setToolTipText("None is used if left blank");
        tabGamePlay.add(txtPathToBadWords, new org.netbeans.lib.awtextra.AbsoluteConstraints(330, 330, 130, -1));

        lblPathToBadWords.setText("Path to bad word file");
        tabGamePlay.add(lblPathToBadWords, new org.netbeans.lib.awtextra.AbsoluteConstraints(460, 340, -1, -1));

        chkFilterChat.setText("Filter chat");
        tabGamePlay.add(chkFilterChat, new org.netbeans.lib.awtextra.AbsoluteConstraints(330, 400, -1, -1));

        chkFilterChatSimple.setText("Filter chat simple");
        tabGamePlay.add(chkFilterChatSimple, new org.netbeans.lib.awtextra.AbsoluteConstraints(330, 380, -1, -1));

        chkFilterCallSigns.setText("Filter callsigns");
        tabGamePlay.add(chkFilterCallSigns, new org.netbeans.lib.awtextra.AbsoluteConstraints(330, 360, -1, -1));

        tabAllTabs.addTab("Game Play", tabGamePlay);

        tabServer.setAutoscrolls(true);
        tabServer.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        chkQuiteAfterOneGame.setText("Quit after one game");
        tabServer.add(chkQuiteAfterOneGame, new org.netbeans.lib.awtextra.AbsoluteConstraints(380, 340, -1, -1));

        txtPublicMessage.setText("Noo BZFlag Server");
        tabServer.add(txtPublicMessage, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 20, 208, -1));

        lblPublicMessage.setText("Public message");
        tabServer.add(lblPublicMessage, new org.netbeans.lib.awtextra.AbsoluteConstraints(230, 30, -1, -1));

        lblPublicAddress.setText("Public address");
        tabServer.add(lblPublicAddress, new org.netbeans.lib.awtextra.AbsoluteConstraints(180, 60, -1, -1));

        txtPublicAddress.setText("123.456.789.000:5154");
        tabServer.add(txtPublicAddress, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 50, -1, -1));

        txtListeningPort.setText("5154");
        tabServer.add(txtListeningPort, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 80, 58, -1));

        lblListeningPort.setText("Listening port");
        tabServer.add(lblListeningPort, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 90, -1, -1));

        chkMakeServerPrivate.setText("Private server");
        tabServer.add(chkMakeServerPrivate, new org.netbeans.lib.awtextra.AbsoluteConstraints(380, 360, -1, -1));

        lblListeningAddress.setText("Listening address (interface)");
        tabServer.add(lblListeningAddress, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 120, -1, -1));

        txtListeningAddress.setToolTipText("Default is used if left blank");
        tabServer.add(txtListeningAddress, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 110, 129, -1));

        chkRequireUDP.setSelected(true);
        chkRequireUDP.setText("Require UDP");
        tabServer.add(chkRequireUDP, new org.netbeans.lib.awtextra.AbsoluteConstraints(380, 320, -1, -1));

        txtPathToPasswordDatabase.setToolTipText("None is used if left blank");
        tabServer.add(txtPathToPasswordDatabase, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 140, 129, -1));

        lblPathToPasswordDatabase.setText("Path to password database");
        tabServer.add(lblPathToPasswordDatabase, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 150, -1, -1));

        txtPathToUserDatabase.setToolTipText("None is used if left blank");
        tabServer.add(txtPathToUserDatabase, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 170, 129, -1));

        lblPathToUserDatabase.setText("Path to user database");
        tabServer.add(lblPathToUserDatabase, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 180, -1, -1));

        txtPathToGroupDatabase.setToolTipText("None is used if left blank");
        tabServer.add(txtPathToGroupDatabase, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 200, 129, -1));

        lblPathToGroupDatabase.setText("Path to group database");
        tabServer.add(lblPathToGroupDatabase, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 210, -1, -1));

        lblRegisteredGroupName.setText("Registered group name");
        tabServer.add(lblRegisteredGroupName, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 240, -1, -1));

        txtRegisteredGroupName.setToolTipText("None is used if left blank");
        tabServer.add(txtRegisteredGroupName, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 230, 129, -1));

        spnMaxIdleTime.setModel(new javax.swing.SpinnerNumberModel(300, 1, 999, 1));
        tabServer.add(spnMaxIdleTime, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 440, 57, -1));

        lblMaxIdleTime.setText("Max idle time (seconds)");
        tabServer.add(lblMaxIdleTime, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 450, -1, 20));

        lblAdminAnnounceLag.setText("Admin annouce lag time (milliseconds)");
        tabServer.add(lblAdminAnnounceLag, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 480, -1, -1));

        spnAdminAnnounceLag.setModel(new javax.swing.SpinnerNumberModel(0, 0, 999, 1));
        tabServer.add(spnAdminAnnounceLag, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 470, 57, -1));

        spnAnnounceLag.setModel(new javax.swing.SpinnerNumberModel(0, 0, 999, 1));
        tabServer.add(spnAnnounceLag, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 500, 57, -1));

        lblAnnounceLag.setText("Annouce lag time (milliseconds)");
        tabServer.add(lblAnnounceLag, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 510, -1, -1));

        lblKickPlayerAfterLag.setText("Kick player after this many lag warnings");
        tabServer.add(lblKickPlayerAfterLag, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 540, -1, -1));

        spnKickPlayerAfterLag.setModel(new javax.swing.SpinnerNumberModel(3, 1, 999, 1));
        tabServer.add(spnKickPlayerAfterLag, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 530, 57, -1));

        lblPathToBanFile.setText("Path to ban file");
        tabServer.add(lblPathToBanFile, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 270, -1, -1));

        txtPathToBanFile.setToolTipText("None is used if left blank");
        tabServer.add(txtPathToBanFile, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 260, 129, -1));

        txtBanAddresses.setToolTipText("<html>None is used if left blank.  <br />Use * as wild card for ranges.</html>");
        tabServer.add(txtBanAddresses, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 290, 129, -1));

        lblBanAddresses.setText("Ban addresses");
        tabServer.add(lblBanAddresses, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 300, -1, -1));

        lblPathToPIDFile.setText("Path to PID file");
        tabServer.add(lblPathToPIDFile, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 330, -1, -1));

        txtPathToPIDFile.setToolTipText("None is used if left blank");
        tabServer.add(txtPathToPIDFile, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 320, 129, -1));

        lblWelcomeMessage.setText("Server welcome message");
        tabServer.add(lblWelcomeMessage, new org.netbeans.lib.awtextra.AbsoluteConstraints(380, 20, -1, -1));

        txtWelcomeMessage.setColumns(19);
        txtWelcomeMessage.setRows(5);
        txtWelcomeMessage.setText("This is a Noo BZflag server\nHave Fun and Play Nice");
        txtWelcomeMessage.setWrapStyleWord(true);
        jScrollPane1.setViewportView(txtWelcomeMessage);

        tabServer.add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(380, 40, -1, 111));

        txtBroadcastMessage.setColumns(19);
        txtBroadcastMessage.setRows(5);
        txtBroadcastMessage.setText("Noo BZflag Server\nBZFlag is Fun");
        txtBroadcastMessage.setWrapStyleWord(true);
        jScrollPane2.setViewportView(txtBroadcastMessage);

        tabServer.add(jScrollPane2, new org.netbeans.lib.awtextra.AbsoluteConstraints(380, 190, -1, 111));

        lblBroadcastMessage.setText("Server broadcast message");
        tabServer.add(lblBroadcastMessage, new org.netbeans.lib.awtextra.AbsoluteConstraints(380, 170, -1, -1));

        spnSpamTime.setModel(new javax.swing.SpinnerNumberModel(15, 1, 999, 1));
        tabServer.add(spnSpamTime, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 410, 57, -1));

        lblSpamTime.setText("Spam time (seconds)");
        tabServer.add(lblSpamTime, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 420, -1, -1));

        chkSyncTimeWithServer.setText("Sync time with server");
        tabServer.add(chkSyncTimeWithServer, new org.netbeans.lib.awtextra.AbsoluteConstraints(380, 380, -1, -1));

        lblInertiaX.setText("Inertia X");
        tabServer.add(lblInertiaX, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 360, -1, -1));

        lblInertiaY.setText("Inertia Y");
        tabServer.add(lblInertiaY, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 390, -1, -1));

        sldDebugLevel.setMajorTickSpacing(1);
        sldDebugLevel.setMaximum(4);
        sldDebugLevel.setMinimum(1);
        sldDebugLevel.setPaintLabels(true);
        sldDebugLevel.setPaintTicks(true);
        sldDebugLevel.setSnapToTicks(true);
        sldDebugLevel.setValue(2);
        sldDebugLevel.addChangeListener(new javax.swing.event.ChangeListener() {
            public void stateChanged(javax.swing.event.ChangeEvent evt) {
                sldDebugLevelStateChanged(evt);
            }
        });
        tabServer.add(sldDebugLevel, new org.netbeans.lib.awtextra.AbsoluteConstraints(390, 450, 89, -1));

        lblDebugLevel.setText("Debug level");
        tabServer.add(lblDebugLevel, new org.netbeans.lib.awtextra.AbsoluteConstraints(480, 470, -1, -1));

        spnInertiaX.setModel(new javax.swing.SpinnerNumberModel(50, 0, 999, 1));
        tabServer.add(spnInertiaX, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 350, -1, -1));

        spnInertiaY.setModel(new javax.swing.SpinnerNumberModel(38, 0, 999, 1));
        tabServer.add(spnInertiaY, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 380, -1, -1));

        chkPrintScoreToConsole.setText("Print score to console");
        tabServer.add(chkPrintScoreToConsole, new org.netbeans.lib.awtextra.AbsoluteConstraints(380, 400, -1, -1));

        chkAddTimestampToLog.setText("Add timestamps to log");
        tabServer.add(chkAddTimestampToLog, new org.netbeans.lib.awtextra.AbsoluteConstraints(380, 420, -1, -1));

        tabAllTabs.addTab("Server", tabServer);

        tabFlags.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        chkFlagsOnBuildings.setText("Flags on buildings");
        tabFlags.add(chkFlagsOnBuildings, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 470, -1, -1));

        chkAntidoteFlags.setText("Antidote flags");
        tabFlags.add(chkAntidoteFlags, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 450, -1, -1));

        lblGoodFlags.setText("Bad Flags");
        tabFlags.add(lblGoodFlags, new org.netbeans.lib.awtextra.AbsoluteConstraints(420, 20, -1, -1));

        lblAgility.setText("Agility");
        tabFlags.add(lblAgility, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 50, -1, -1));

        spnAgility.setModel(new javax.swing.SpinnerNumberModel(0, -1, 100, 1));
        spnAgility.setToolTipText("<html>-1 is OFF<br />0 is ON<br />Positive numbers are ON WITH X SHOTS</html>");
        spnAgility.setEnabled(false);
        tabFlags.add(spnAgility, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 40, -1, -1));

        spnCloaking.setModel(new javax.swing.SpinnerNumberModel(0, -1, 100, 1));
        spnCloaking.setToolTipText("<html>-1 is OFF<br />0 is ON<br />Positive numbers are ON WITH X SHOTS</html>");
        spnCloaking.setEnabled(false);
        tabFlags.add(spnCloaking, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 70, -1, -1));

        lblCloaking.setText("Cloaking");
        tabFlags.add(lblCloaking, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 80, -1, -1));

        spnRapidFire.setModel(new javax.swing.SpinnerNumberModel(0, -1, 100, 1));
        spnRapidFire.setToolTipText("<html>-1 is OFF<br />0 is ON<br />Positive numbers are ON WITH X SHOTS</html>");
        spnRapidFire.setEnabled(false);
        tabFlags.add(spnRapidFire, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 100, -1, -1));

        lblRapiFire.setText("Rapid fire");
        tabFlags.add(lblRapiFire, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 110, -1, -1));

        spnGenocide.setModel(new javax.swing.SpinnerNumberModel(0, -1, 100, 1));
        spnGenocide.setToolTipText("<html>-1 is OFF<br />0 is ON<br />Positive numbers are ON WITH X SHOTS</html>");
        spnGenocide.setEnabled(false);
        tabFlags.add(spnGenocide, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 130, -1, -1));

        lblGenocide.setText("Genocide");
        tabFlags.add(lblGenocide, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 140, -1, -1));

        spnGuidedMissile.setModel(new javax.swing.SpinnerNumberModel(0, -1, 100, 1));
        spnGuidedMissile.setToolTipText("<html>-1 is OFF<br />0 is ON<br />Positive numbers are ON WITH X SHOTS</html>");
        spnGuidedMissile.setEnabled(false);
        tabFlags.add(spnGuidedMissile, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 160, -1, -1));

        lblGuidedMissile.setText("Guided missile");
        tabFlags.add(lblGuidedMissile, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 170, -1, -1));

        spnInvisibleBullet.setModel(new javax.swing.SpinnerNumberModel(0, -1, 100, 1));
        spnInvisibleBullet.setToolTipText("<html>-1 is OFF<br />0 is ON<br />Positive numbers are ON WITH X SHOTS</html>");
        spnInvisibleBullet.setEnabled(false);
        tabFlags.add(spnInvisibleBullet, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 190, -1, -1));

        lblInvisibleBullet.setText("Invisible bullet");
        tabFlags.add(lblInvisibleBullet, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 200, -1, -1));

        spnLaser.setModel(new javax.swing.SpinnerNumberModel(0, -1, 100, 1));
        spnLaser.setToolTipText("<html>-1 is OFF<br />0 is ON<br />Positive numbers are ON WITH X SHOTS</html>");
        spnLaser.setEnabled(false);
        tabFlags.add(spnLaser, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 220, -1, -1));

        lblLaser.setText("Laser");
        tabFlags.add(lblLaser, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 230, -1, -1));

        spnMachineGun.setModel(new javax.swing.SpinnerNumberModel(0, -1, 100, 1));
        spnMachineGun.setToolTipText("<html>-1 is OFF<br />0 is ON<br />Positive numbers are ON WITH X SHOTS</html>");
        spnMachineGun.setEnabled(false);
        tabFlags.add(spnMachineGun, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 250, -1, -1));

        lblMachineGun.setText("Machine gun");
        tabFlags.add(lblMachineGun, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 260, -1, -1));

        spnNarrow.setModel(new javax.swing.SpinnerNumberModel(0, -1, 100, 1));
        spnNarrow.setToolTipText("<html>-1 is OFF<br />0 is ON<br />Positive numbers are ON WITH X SHOTS</html>");
        spnNarrow.setEnabled(false);
        tabFlags.add(spnNarrow, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 280, -1, -1));

        lblNarrow.setText("Narrow");
        tabFlags.add(lblNarrow, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 290, -1, -1));

        spnOscillationOverthruster.setModel(new javax.swing.SpinnerNumberModel(0, -1, 100, 1));
        spnOscillationOverthruster.setToolTipText("<html>-1 is OFF<br />0 is ON<br />Positive numbers are ON WITH X SHOTS</html>");
        spnOscillationOverthruster.setEnabled(false);
        tabFlags.add(spnOscillationOverthruster, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 310, -1, -1));

        lblOscillationOverthruster.setText("Oscillation Overthruster");
        tabFlags.add(lblOscillationOverthruster, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 320, -1, -1));

        spnPhantomZone.setModel(new javax.swing.SpinnerNumberModel(0, -1, 100, 1));
        spnPhantomZone.setToolTipText("<html>-1 is OFF<br />0 is ON<br />Positive numbers are ON WITH X SHOTS</html>");
        spnPhantomZone.setEnabled(false);
        tabFlags.add(spnPhantomZone, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 340, -1, -1));

        lblPhantomZone.setText("Phantom zone");
        tabFlags.add(lblPhantomZone, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 350, -1, -1));

        spnQuickturn.setModel(new javax.swing.SpinnerNumberModel(0, -1, 100, 1));
        spnQuickturn.setToolTipText("<html>-1 is OFF<br />0 is ON<br />Positive numbers are ON WITH X SHOTS</html>");
        spnQuickturn.setEnabled(false);
        tabFlags.add(spnQuickturn, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 370, -1, -1));

        lblQuickTurn.setText("Quick turn");
        tabFlags.add(lblQuickTurn, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 380, -1, -1));

        spnSuperBullet.setModel(new javax.swing.SpinnerNumberModel(0, -1, 100, 1));
        spnSuperBullet.setToolTipText("<html>-1 is OFF<br />0 is ON<br />Positive numbers are ON WITH X SHOTS</html>");
        spnSuperBullet.setEnabled(false);
        tabFlags.add(spnSuperBullet, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 400, -1, -1));

        lblSuperBullet.setText("Super bullet");
        tabFlags.add(lblSuperBullet, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 410, -1, -1));

        spnSeer.setModel(new javax.swing.SpinnerNumberModel(0, -1, 100, 1));
        spnSeer.setToolTipText("<html>-1 is OFF<br />0 is ON<br />Positive numbers are ON WITH X SHOTS</html>");
        spnSeer.setEnabled(false);
        tabFlags.add(spnSeer, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 430, -1, -1));

        lblSeer.setText("Seer");
        tabFlags.add(lblSeer, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 440, -1, -1));

        spnSheild.setModel(new javax.swing.SpinnerNumberModel(0, -1, 100, 1));
        spnSheild.setToolTipText("<html>-1 is OFF<br />0 is ON<br />Positive numbers are ON WITH X SHOTS</html>");
        spnSheild.setEnabled(false);
        tabFlags.add(spnSheild, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 460, -1, -1));

        lblShield.setText("Shield");
        tabFlags.add(lblShield, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 470, -1, -1));

        spnSteamroller.setModel(new javax.swing.SpinnerNumberModel(0, -1, 100, 1));
        spnSteamroller.setToolTipText("<html>-1 is OFF<br />0 is ON<br />Positive numbers are ON WITH X SHOTS</html>");
        spnSteamroller.setEnabled(false);
        tabFlags.add(spnSteamroller, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 490, -1, -1));

        lblSteamroller.setText("Steamroller");
        tabFlags.add(lblSteamroller, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 500, -1, -1));

        spnStealth.setModel(new javax.swing.SpinnerNumberModel(0, -1, 100, 1));
        spnStealth.setToolTipText("<html>-1 is OFF<br />0 is ON<br />Positive numbers are ON WITH X SHOTS</html>");
        spnStealth.setEnabled(false);
        tabFlags.add(spnStealth, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 520, -1, -1));

        lblStealth.setText("Stealth");
        tabFlags.add(lblStealth, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 530, -1, -1));

        spnShockwave.setModel(new javax.swing.SpinnerNumberModel(0, -1, 100, 1));
        spnShockwave.setToolTipText("<html>-1 is OFF<br />0 is ON<br />Positive numbers are ON WITH X SHOTS</html>");
        spnShockwave.setEnabled(false);
        tabFlags.add(spnShockwave, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 40, -1, -1));

        lblShockwave.setText("Shockwave");
        tabFlags.add(lblShockwave, new org.netbeans.lib.awtextra.AbsoluteConstraints(280, 50, -1, -1));

        spnTiny.setModel(new javax.swing.SpinnerNumberModel(0, -1, 100, 1));
        spnTiny.setToolTipText("<html>-1 is OFF<br />0 is ON<br />Positive numbers are ON WITH X SHOTS</html>");
        spnTiny.setEnabled(false);
        tabFlags.add(spnTiny, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 70, -1, -1));

        lblTiny.setText("Tiny");
        tabFlags.add(lblTiny, new org.netbeans.lib.awtextra.AbsoluteConstraints(280, 80, -1, -1));

        spnTheif.setModel(new javax.swing.SpinnerNumberModel(0, -1, 100, 1));
        spnTheif.setToolTipText("<html>-1 is OFF<br />0 is ON<br />Positive numbers are ON WITH X SHOTS</html>");
        spnTheif.setEnabled(false);
        tabFlags.add(spnTheif, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 100, -1, -1));

        lblTheif.setText("Theif");
        tabFlags.add(lblTheif, new org.netbeans.lib.awtextra.AbsoluteConstraints(280, 110, -1, -1));

        spnUseless.setModel(new javax.swing.SpinnerNumberModel(0, -1, 100, 1));
        spnUseless.setToolTipText("<html>-1 is OFF<br />0 is ON<br />Positive numbers are ON WITH X SHOTS</html>");
        spnUseless.setEnabled(false);
        tabFlags.add(spnUseless, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 130, -1, -1));

        lblUseless.setText("Useless");
        tabFlags.add(lblUseless, new org.netbeans.lib.awtextra.AbsoluteConstraints(280, 140, -1, -1));

        spnHighSpeed.setModel(new javax.swing.SpinnerNumberModel(0, -1, 100, 1));
        spnHighSpeed.setToolTipText("<html>-1 is OFF<br />0 is ON<br />Positive numbers are ON WITH X SHOTS</html>");
        spnHighSpeed.setEnabled(false);
        tabFlags.add(spnHighSpeed, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 160, -1, -1));

        lblHighSpeed.setText("High speed");
        tabFlags.add(lblHighSpeed, new org.netbeans.lib.awtextra.AbsoluteConstraints(280, 170, -1, -1));

        spnWings.setModel(new javax.swing.SpinnerNumberModel(0, -1, 100, 1));
        spnWings.setToolTipText("<html>-1 is OFF<br />0 is ON<br />Positive numbers are ON WITH X SHOTS</html>");
        spnWings.setEnabled(false);
        tabFlags.add(spnWings, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 190, -1, -1));

        lblWings.setText("Wings");
        tabFlags.add(lblWings, new org.netbeans.lib.awtextra.AbsoluteConstraints(280, 200, -1, -1));

        chkAllBadFlagsOn.setSelected(true);
        chkAllBadFlagsOn.setText("All bad flags on");
        chkAllBadFlagsOn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                chkAllBadFlagsOnActionPerformed(evt);
            }
        });
        tabFlags.add(chkAllBadFlagsOn, new org.netbeans.lib.awtextra.AbsoluteConstraints(420, 460, -1, -1));

        lblBlindness.setText("Blindness");
        tabFlags.add(lblBlindness, new org.netbeans.lib.awtextra.AbsoluteConstraints(490, 50, -1, -1));

        spnBlindness.setModel(new javax.swing.SpinnerNumberModel(0, -1, 100, 1));
        spnBlindness.setToolTipText("<html>-1 is OFF<br />0 is ON<br />Positive numbers are ON WITH X SHOTS</html>");
        spnBlindness.setEnabled(false);
        tabFlags.add(spnBlindness, new org.netbeans.lib.awtextra.AbsoluteConstraints(420, 40, -1, -1));

        spnBouncy.setModel(new javax.swing.SpinnerNumberModel(0, -1, 100, 1));
        spnBouncy.setToolTipText("<html>-1 is OFF<br />0 is ON<br />Positive numbers are ON WITH X SHOTS</html>");
        spnBouncy.setEnabled(false);
        tabFlags.add(spnBouncy, new org.netbeans.lib.awtextra.AbsoluteConstraints(420, 70, -1, -1));

        lblBouncy.setText("Bouncy");
        tabFlags.add(lblBouncy, new org.netbeans.lib.awtextra.AbsoluteConstraints(490, 80, -1, -1));

        spnColourBlindness.setModel(new javax.swing.SpinnerNumberModel(0, -1, 100, 1));
        spnColourBlindness.setToolTipText("<html>-1 is OFF<br />0 is ON<br />Positive numbers are ON WITH X SHOTS</html>");
        spnColourBlindness.setEnabled(false);
        tabFlags.add(spnColourBlindness, new org.netbeans.lib.awtextra.AbsoluteConstraints(420, 100, -1, -1));

        lblColourBlindness.setText("Colour blindness");
        tabFlags.add(lblColourBlindness, new org.netbeans.lib.awtextra.AbsoluteConstraints(490, 110, -1, -1));

        spnForwardOnly.setModel(new javax.swing.SpinnerNumberModel(0, -1, 100, 1));
        spnForwardOnly.setToolTipText("<html>-1 is OFF<br />0 is ON<br />Positive numbers are ON WITH X SHOTS</html>");
        spnForwardOnly.setEnabled(false);
        tabFlags.add(spnForwardOnly, new org.netbeans.lib.awtextra.AbsoluteConstraints(420, 130, -1, -1));

        lblForwardOnly.setText("Forward only");
        tabFlags.add(lblForwardOnly, new org.netbeans.lib.awtextra.AbsoluteConstraints(490, 140, -1, -1));

        spnJamming.setModel(new javax.swing.SpinnerNumberModel(0, -1, 100, 1));
        spnJamming.setToolTipText("<html>-1 is OFF<br />0 is ON<br />Positive numbers are ON WITH X SHOTS</html>");
        spnJamming.setEnabled(false);
        tabFlags.add(spnJamming, new org.netbeans.lib.awtextra.AbsoluteConstraints(420, 160, -1, -1));

        lblJamming.setText("Jamming");
        tabFlags.add(lblJamming, new org.netbeans.lib.awtextra.AbsoluteConstraints(490, 170, -1, -1));

        spnLeftTurnOnly.setModel(new javax.swing.SpinnerNumberModel(0, -1, 100, 1));
        spnLeftTurnOnly.setToolTipText("<html>-1 is OFF<br />0 is ON<br />Positive numbers are ON WITH X SHOTS</html>");
        spnLeftTurnOnly.setEnabled(false);
        tabFlags.add(spnLeftTurnOnly, new org.netbeans.lib.awtextra.AbsoluteConstraints(420, 190, -1, -1));

        lblLeftTurnOnly.setText("Left turn only");
        tabFlags.add(lblLeftTurnOnly, new org.netbeans.lib.awtextra.AbsoluteConstraints(490, 200, -1, -1));

        spnMomentum.setModel(new javax.swing.SpinnerNumberModel(0, -1, 100, 1));
        spnMomentum.setToolTipText("<html>-1 is OFF<br />0 is ON<br />Positive numbers are ON WITH X SHOTS</html>");
        spnMomentum.setEnabled(false);
        tabFlags.add(spnMomentum, new org.netbeans.lib.awtextra.AbsoluteConstraints(420, 220, -1, -1));

        lblMomentum.setText("Momentum");
        tabFlags.add(lblMomentum, new org.netbeans.lib.awtextra.AbsoluteConstraints(490, 230, -1, -1));

        spnNoJumping.setModel(new javax.swing.SpinnerNumberModel(0, -1, 100, 1));
        spnNoJumping.setToolTipText("<html>-1 is OFF<br />0 is ON<br />Positive numbers are ON WITH X SHOTS</html>");
        spnNoJumping.setEnabled(false);
        tabFlags.add(spnNoJumping, new org.netbeans.lib.awtextra.AbsoluteConstraints(420, 250, -1, -1));

        lblNoJumping.setText("No jumping");
        tabFlags.add(lblNoJumping, new org.netbeans.lib.awtextra.AbsoluteConstraints(490, 260, -1, -1));

        spnObesity.setModel(new javax.swing.SpinnerNumberModel(0, -1, 100, 1));
        spnObesity.setToolTipText("<html>-1 is OFF<br />0 is ON<br />Positive numbers are ON WITH X SHOTS</html>");
        spnObesity.setEnabled(false);
        tabFlags.add(spnObesity, new org.netbeans.lib.awtextra.AbsoluteConstraints(420, 280, -1, -1));

        lblObesity.setText("Obesity");
        tabFlags.add(lblObesity, new org.netbeans.lib.awtextra.AbsoluteConstraints(490, 290, -1, -1));

        spnReverseControlls.setModel(new javax.swing.SpinnerNumberModel(0, -1, 100, 1));
        spnReverseControlls.setToolTipText("<html>-1 is OFF<br />0 is ON<br />Positive numbers are ON WITH X SHOTS</html>");
        spnReverseControlls.setEnabled(false);
        tabFlags.add(spnReverseControlls, new org.netbeans.lib.awtextra.AbsoluteConstraints(420, 310, -1, -1));

        lblReverseControlls.setText("Reverse controlls");
        tabFlags.add(lblReverseControlls, new org.netbeans.lib.awtextra.AbsoluteConstraints(490, 320, -1, -1));

        spnReverseOnly.setModel(new javax.swing.SpinnerNumberModel(0, -1, 100, 1));
        spnReverseOnly.setToolTipText("<html>-1 is OFF<br />0 is ON<br />Positive numbers are ON WITH X SHOTS</html>");
        spnReverseOnly.setEnabled(false);
        tabFlags.add(spnReverseOnly, new org.netbeans.lib.awtextra.AbsoluteConstraints(420, 340, -1, -1));

        lblReverseOnly.setText("Reverse only");
        tabFlags.add(lblReverseOnly, new org.netbeans.lib.awtextra.AbsoluteConstraints(490, 350, -1, -1));

        spnRightTurnOnly.setModel(new javax.swing.SpinnerNumberModel(0, -1, 100, 1));
        spnRightTurnOnly.setToolTipText("<html>-1 is OFF<br />0 is ON<br />Positive numbers are ON WITH X SHOTS</html>");
        spnRightTurnOnly.setEnabled(false);
        tabFlags.add(spnRightTurnOnly, new org.netbeans.lib.awtextra.AbsoluteConstraints(420, 370, -1, -1));

        lblRightTurnOnly.setText("Right turn only");
        tabFlags.add(lblRightTurnOnly, new org.netbeans.lib.awtextra.AbsoluteConstraints(490, 380, -1, -1));

        spnTriggerHappy.setModel(new javax.swing.SpinnerNumberModel(0, -1, 100, 1));
        spnTriggerHappy.setToolTipText("<html>-1 is OFF<br />0 is ON<br />Positive numbers are ON WITH X SHOTS</html>");
        spnTriggerHappy.setEnabled(false);
        tabFlags.add(spnTriggerHappy, new org.netbeans.lib.awtextra.AbsoluteConstraints(420, 400, -1, -1));

        lblTriggerHappy.setText("Trigger happy");
        tabFlags.add(lblTriggerHappy, new org.netbeans.lib.awtextra.AbsoluteConstraints(490, 410, -1, -1));

        spnWideAngle.setModel(new javax.swing.SpinnerNumberModel(0, -1, 100, 1));
        spnWideAngle.setToolTipText("<html>-1 is OFF<br />0 is ON<br />Positive numbers are ON WITH X SHOTS</html>");
        spnWideAngle.setEnabled(false);
        tabFlags.add(spnWideAngle, new org.netbeans.lib.awtextra.AbsoluteConstraints(420, 430, -1, -1));

        lblWideAngle.setText("Wide angle");
        tabFlags.add(lblWideAngle, new org.netbeans.lib.awtextra.AbsoluteConstraints(490, 440, -1, -1));

        lblGoodFlags1.setText("Good Flags");
        tabFlags.add(lblGoodFlags1, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 20, -1, -1));

        chkAllGoodFlagsOn.setSelected(true);
        chkAllGoodFlagsOn.setText("All good flags on");
        chkAllGoodFlagsOn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                chkAllGoodFlagsOnActionPerformed(evt);
            }
        });
        tabFlags.add(chkAllGoodFlagsOn, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 280, -1, -1));

        spnExtraFlags.setModel(new javax.swing.SpinnerNumberModel(0, -1, 100, 1));
        spnExtraFlags.setToolTipText("<html>-1 is OFF<br />0 is ON<br />Positive numbers are ON WITH X SHOTS</html>");
        tabFlags.add(spnExtraFlags, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 490, -1, -1));

        lblExtraFlags.setText("Extra flags");
        tabFlags.add(lblExtraFlags, new org.netbeans.lib.awtextra.AbsoluteConstraints(280, 500, -1, -1));

        spnNumberOfFlags.setModel(new javax.swing.SpinnerNumberModel(30, -1, 100, 1));
        spnNumberOfFlags.setToolTipText("<html>-1 is OFF<br />0 is ON<br />Positive numbers are ON WITH X SHOTS</html>");
        tabFlags.add(spnNumberOfFlags, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 520, -1, -1));

        lblNumberOfFlags.setText("Number of flags");
        tabFlags.add(lblNumberOfFlags, new org.netbeans.lib.awtextra.AbsoluteConstraints(280, 530, -1, -1));
        tabFlags.add(jSeparator1, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 440, 160, -1));

        spnJumpingFlag.setModel(new javax.swing.SpinnerNumberModel(0, -1, 100, 1));
        spnJumpingFlag.setToolTipText("<html>-1 is OFF<br />0 is ON<br />Positive numbers are ON WITH X SHOTS</html>");
        spnJumpingFlag.setEnabled(false);
        tabFlags.add(spnJumpingFlag, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 220, -1, -1));

        lblJumpingFlag.setText("Jumping");
        tabFlags.add(lblJumpingFlag, new org.netbeans.lib.awtextra.AbsoluteConstraints(280, 230, -1, -1));

        spnRicochetingFlag.setModel(new javax.swing.SpinnerNumberModel(0, -1, 100, 1));
        spnRicochetingFlag.setToolTipText("<html>-1 is OFF<br />0 is ON<br />Positive numbers are ON WITH X SHOTS</html>");
        spnRicochetingFlag.setEnabled(false);
        tabFlags.add(spnRicochetingFlag, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 250, -1, -1));

        lblRicochetingFlag.setText("Ricocheting");
        tabFlags.add(lblRicochetingFlag, new org.netbeans.lib.awtextra.AbsoluteConstraints(280, 260, -1, -1));

        tabAllTabs.addTab("Flags", tabFlags);

        btnLaunchServer.setText("Launch Server");
        btnLaunchServer.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnLaunchServerActionPerformed(evt);
            }
        });

        btnImportSettings.setText("Import settings");
        btnImportSettings.setEnabled(false);
        btnImportSettings.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnImportSettingsActionPerformed(evt);
            }
        });

        btnExportSettings.setText("Export settings");
        btnExportSettings.setEnabled(false);
        btnExportSettings.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnExportSettingsActionPerformed(evt);
            }
        });

        btnKillServer.setText("Kill Server");
        btnKillServer.setEnabled(false);
        btnKillServer.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnKillServerActionPerformed(evt);
            }
        });

        lblVersion.setText("Version: BLAH");

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, tabAllTabs, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 651, Short.MAX_VALUE)
                    .add(layout.createSequentialGroup()
                        .add(btnImportSettings)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                        .add(btnExportSettings)
                        .add(18, 18, 18)
                        .add(lblVersion)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 27, Short.MAX_VALUE)
                        .add(btnKillServer)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                        .add(btnLaunchServer)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(tabAllTabs, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 615, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(btnLaunchServer)
                    .add(btnImportSettings)
                    .add(btnExportSettings)
                    .add(btnKillServer)
                    .add(lblVersion))
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    public JLabel getLblVersion() {
        return lblVersion;
    }


    public void setCmbMaps(JComboBox cmbMaps) {
        this.cmbMaps = cmbMaps;
    }

    public JCheckBox getChkAddTeleporters() {
        return chkAddTeleporters;
    }

    public JCheckBox getChkAddTimestampToLog() {
        return chkAddTimestampToLog;
    }

    public JCheckBox getChkAllBadflagsOn() {
        return chkAllBadFlagsOn;
    }

    public JCheckBox getChkAllGoodflagsOn() {
        return chkAllGoodFlagsOn;
    }

    public JCheckBox getChkAnnounceTKToAdmins() {
        return chkAnnounceTKToAdmins;
    }

    public JCheckBox getChkAntidoteFlags() {
        return chkAntidoteFlags;
    }

    public JCheckBox getChkAutoTeam() {
        return chkAutoTeam;
    }

    public JCheckBox getChkDieOnTeamKill() {
        return chkDieOnTeamKill;
    }

    public JCheckBox getChkDisableBots() {
        return chkDisableBots;
    }

    public JCheckBox getChkFilterCallSigns() {
        return chkFilterCallSigns;
    }

    public JCheckBox getChkFilterChat() {
        return chkFilterChat;
    }

    public JCheckBox getChkFilterChatSimple() {
        return chkFilterChatSimple;
    }

    public JCheckBox getChkFlagsOnBuildings() {
        return chkFlagsOnBuildings;
    }

    public JCheckBox getChkJumping() {
        return chkJumping;
    }

    public JCheckBox getChkMakeServerPrivate() {
        return chkMakeServerPrivate;
    }

    public JCheckBox getChkManuallyStartTimedGame() {
        return chkManuallyStartTimedGame;
    }

    public JCheckBox getChkPrintScoreToConsole() {
        return chkPrintScoreToConsole;
    }

    public JCheckBox getChkQuiteAfterOneGame() {
        return chkQuiteAfterOneGame;
    }

    public JCheckBox getChkRandomHeightBuildings() {
        return chkRandomHeightBuildings;
    }

    public JCheckBox getChkRandomRotateObjects() {
        return chkRandomRotateObjects;
    }

    public JCheckBox getChkRandomWorld() {
        return chkRandomWorld;
    }

    public JCheckBox getChkRequireUDP() {
        return chkRequireUDP;
    }

    public JCheckBox getChkRicochet() {
        return chkRicochet;
    }

    public JCheckBox getChkSpawnOnBuilding() {
        return chkSpawnOnBuilding;
    }

    public JCheckBox getChkSyncTimeWithServer() {
        return chkSyncTimeWithServer;
    }

    public JComboBox getCmbGameStyle() {
        return cmbGameStyle;
    }

    public JComboBox getCmbMaps() {
        return cmbMaps;
    }

    public Controller getController() {
        return controller;
    }

    public JPasswordField getPassAdminPassword() {
        return passAdminPassword;
    }

    public JPasswordField getPassConfirmAdminPassword() {
        return passConfirmAdminPassword;
    }

    public JSlider getSldDebugLevel() {
        return sldDebugLevel;
    }

    public JSpinner getSpnAdminAnnounceLag() {
        return spnAdminAnnounceLag;
    }

    public JSpinner getSpnAgility() {
        return spnAgility;
    }

    public JSpinner getSpnAnnounceLag() {
        return spnAnnounceLag;
    }

    public JSpinner getSpnKickPlayerAfterlag() {
        return spnKickPlayerAfterLag;
    }

    public JSpinner getSpnBlindness() {
        return spnBlindness;
    }

    public JSpinner getSpnBouncy() {
        return spnBouncy;
    }

    public JSpinner getSpnBuildingDensity() {
        return spnBuildingDensity;
    }

    public JSpinner getSpnCloaking() {
        return spnCloaking;
    }

    public JSpinner getSpnColourBlindness() {
        return spnColourBlindness;
    }

    public JSpinner getSpnExtraFlags() {
        return spnExtraFlags;
    }

    public JSpinner getSpnForwardOnly() {
        return spnForwardOnly;
    }

    public JSpinner getSpnGameTime() {
        return spnGameTime;
    }

    public JSpinner getSpnGenocide() {
        return spnGenocide;
    }

    public JSpinner getSpnGuidedMissile() {
        return spnGuidedMissile;
    }

    public JSpinner getSpnHighSpeed() {
        return spnHighSpeed;
    }

    public JSpinner getSpnInertiaX() {
        return spnInertiaX;
    }

    public JSpinner getSpnInertiaY() {
        return spnInertiaY;
    }

    public JSpinner getSpnInvisibleBullet() {
        return spnInvisibleBullet;
    }

    public JSpinner getSpnJamming() {
        return spnJamming;
    }

    public JSpinner getSpnJumpingFlag() {
        return spnJumpingFlag;
    }

    public JSpinner getSpnLaser() {
        return spnLaser;
    }

    public JSpinner getSpnLeftTurnOnly() {
        return spnLeftTurnOnly;
    }

    public JSpinner getSpnMachineGun() {
        return spnMachineGun;
    }

    public JSpinner getSpnMaxIdleTime() {
        return spnMaxIdleTime;
    }

    public JSpinner getSpnMaxPlayerScore() {
        return spnMaxPlayerScore;
    }

    public JSpinner getSpnMaxPlayers() {
        return spnMaxPlayers;
    }

    public JSpinner getSpnMaxShots() {
        return spnMaxShots;
    }

    public JSpinner getSpnMaxTeamKills() {
        return spnMaxTeamKills;
    }

    public JSpinner getSpnMaxTeamScore() {
        return spnMaxTeamScore;
    }

    public JSpinner getSpnMomentum() {
        return spnMomentum;
    }

    public JSpinner getSpnNarrow() {
        return spnNarrow;
    }

    public JSpinner getSpnNoJumping() {
        return spnNoJumping;
    }

    public JSpinner getSpnNumberOfFlags() {
        return spnNumberOfFlags;
    }

    public JSpinner getSpnObesity() {
        return spnObesity;
    }

    public JSpinner getSpnOscillationOverthruster() {
        return spnOscillationOverthruster;
    }

    public JSpinner getSpnPhantomZone() {
        return spnPhantomZone;
    }

    public JSpinner getSpnQuickturn() {
        return spnQuickturn;
    }

    public JSpinner getSpnRapidFire() {
        return spnRapidFire;
    }

    public JSpinner getSpnReverseControlls() {
        return spnReverseControlls;
    }

    public JSpinner getSpnReverseOnly() {
        return spnReverseOnly;
    }

    public JSpinner getSpnRicochetingFlag() {
        return spnRicochetingFlag;
    }

    public JSpinner getSpnRightTurnOnly() {
        return spnRightTurnOnly;
    }

    public JSpinner getSpnSeer() {
        return spnSeer;
    }

    public JSpinner getSpnSheild() {
        return spnSheild;
    }

    public JSpinner getSpnShockwave() {
        return spnShockwave;
    }

    public JSpinner getSpnSpamTime() {
        return spnSpamTime;
    }

    public JSpinner getSpnStealth() {
        return spnStealth;
    }

    public JSpinner getSpnSteamroller() {
        return spnSteamroller;
    }

    public JSpinner getSpnSuperBullet() {
        return spnSuperBullet;
    }

    public JSpinner getSpnTheif() {
        return spnTheif;
    }

    public JSpinner getSpnTiny() {
        return spnTiny;
    }

    public JSpinner getSpnTriggerHappy() {
        return spnTriggerHappy;
    }

    public JSpinner getSpnUseless() {
        return spnUseless;
    }

    public JSpinner getSpnWideAngle() {
        return spnWideAngle;
    }

    public JSpinner getSpnWings() {
        return spnWings;
    }

    public JSpinner getSpnWorldSize() {
        return spnWorldSize;
    }

    public JTextField getTxtBanAddresses() {
        return txtBanAddresses;
    }

    public JTextArea getTxtBroadcastMessage() {
        return txtBroadcastMessage;
    }

    public JTextField getTxtListeningAddress() {
        return txtListeningAddress;
    }

    public JTextField getTxtListeningPort() {
        return txtListeningPort;
    }

    public JTextField getTxtPathToBadWords() {
        return txtPathToBadWords;
    }

    public JTextField getTxtPathToBanFile() {
        return txtPathToBanFile;
    }

    public JTextField getTxtPathToGroupDatabase() {
        return txtPathToGroupDatabase;
    }

    public JTextField getTxtPathToPIDFile() {
        return txtPathToPIDFile;
    }

    public JTextField getTxtPathToPasswordDatabase() {
        return txtPathToPasswordDatabase;
    }

    public JTextField getTxtPathToUserDatabase() {
        return txtPathToUserDatabase;
    }

    public JTextField getTxtPublicAddress() {
        return txtPublicAddress;
    }

    public JTextField getTxtPublicMessage() {
        return txtPublicMessage;
    }

    public JTextField getTxtRegisteredGroupName() {
        return txtRegisteredGroupName;
    }

    public JTextArea getTxtWelcomeMessage() {
        return txtWelcomeMessage;
    }









    private void chkJumpingActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkJumpingActionPerformed
        if(Integer.parseInt(spnJumpingFlag.getValue().toString()) >= 0 && chkJumping.isSelected()){
            spnJumpingFlag.setValue(-1);
        }
        if(!chkJumping.isSelected()){
            spnJumpingFlag.setValue(0);
        }
}//GEN-LAST:event_chkJumpingActionPerformed

    private void chkRicochetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkRicochetActionPerformed
        if(Integer.parseInt(spnRicochetingFlag.getValue().toString()) >= 0 && chkRicochet.isSelected()){
            spnRicochetingFlag.setValue(-1);
        }
        if(!chkRicochet.isSelected()){
            spnRicochetingFlag.setValue(0);
        }
}//GEN-LAST:event_chkRicochetActionPerformed

    private void cmbGameStyleActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmbGameStyleActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_cmbGameStyleActionPerformed

    private void chkAllGoodFlagsOnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkAllGoodFlagsOnActionPerformed
        if(chkAllGoodFlagsOn.isSelected()){
            spnAgility.setEnabled(false);
            spnCloaking.setEnabled(false);
            spnGenocide.setEnabled(false);
            spnGuidedMissile.setEnabled(false);
            spnHighSpeed.setEnabled(false);
            spnInvisibleBullet.setEnabled(false);
            spnJumpingFlag.setEnabled(false);
            spnLaser.setEnabled(false);
            spnMachineGun.setEnabled(false);
            spnNarrow.setEnabled(false);
            spnOscillationOverthruster.setEnabled(false);
            spnPhantomZone.setEnabled(false);
            spnQuickturn.setEnabled(false);
            spnRapidFire.setEnabled(false);
            spnRicochetingFlag.setEnabled(false);
            spnSeer.setEnabled(false);
            spnSheild.setEnabled(false);
            spnShockwave.setEnabled(false);
            spnStealth.setEnabled(false);
            spnSteamroller.setEnabled(false);
            spnSuperBullet.setEnabled(false);
            spnTheif.setEnabled(false);
            spnTiny.setEnabled(false);
            spnUseless.setEnabled(false);
            spnWings.setEnabled(false);
        }else{
            spnAgility.setEnabled(true);
            spnCloaking.setEnabled(true);
            spnGenocide.setEnabled(true);
            spnGuidedMissile.setEnabled(true);
            spnHighSpeed.setEnabled(true);
            spnInvisibleBullet.setEnabled(true);
            spnJumpingFlag.setEnabled(true);
            spnLaser.setEnabled(true);
            spnMachineGun.setEnabled(true);
            spnNarrow.setEnabled(true);
            spnOscillationOverthruster.setEnabled(true);
            spnPhantomZone.setEnabled(true);
            spnQuickturn.setEnabled(true);
            spnRapidFire.setEnabled(true);
            spnRicochetingFlag.setEnabled(true);
            spnSeer.setEnabled(true);
            spnSheild.setEnabled(true);
            spnShockwave.setEnabled(true);
            spnStealth.setEnabled(true);
            spnSteamroller.setEnabled(true);
            spnSuperBullet.setEnabled(true);
            spnTheif.setEnabled(true);
            spnTiny.setEnabled(true);
            spnUseless.setEnabled(true);
            spnWings.setEnabled(true);
        }
    }//GEN-LAST:event_chkAllGoodFlagsOnActionPerformed

    private void chkAllBadFlagsOnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkAllBadFlagsOnActionPerformed
        if(chkAllBadFlagsOn.isSelected()){
            spnBlindness.setEnabled(false);
            spnBouncy.setEnabled(false);
            spnColourBlindness.setEnabled(false);
            spnForwardOnly.setEnabled(false);
            spnJamming.setEnabled(false);
            spnLeftTurnOnly.setEnabled(false);
            spnLeftTurnOnly.setEnabled(false);
            spnMomentum.setEnabled(false);
            spnNoJumping.setEnabled(false);
            spnObesity.setEnabled(false);
            spnReverseControlls.setEnabled(false);
            spnReverseOnly.setEnabled(false);
            spnRightTurnOnly.setEnabled(false);
            spnTriggerHappy.setEnabled(false);
            spnWideAngle.setEnabled(false);
        }else{
            spnBlindness.setEnabled(true);
            spnBouncy.setEnabled(true);
            spnColourBlindness.setEnabled(true);
            spnForwardOnly.setEnabled(true);
            spnJamming.setEnabled(true);
            spnLeftTurnOnly.setEnabled(true);
            spnLeftTurnOnly.setEnabled(true);
            spnMomentum.setEnabled(true);
            spnNoJumping.setEnabled(true);
            spnObesity.setEnabled(true);
            spnReverseControlls.setEnabled(true);
            spnReverseOnly.setEnabled(true);
            spnRightTurnOnly.setEnabled(true);
            spnTriggerHappy.setEnabled(true);
            spnWideAngle.setEnabled(true);
        }
    }//GEN-LAST:event_chkAllBadFlagsOnActionPerformed

    private void btnKillServerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnKillServerActionPerformed
        //JOptionPane.showMessageDialog(null, "I will kill the server");
        controller.killServer();
    }//GEN-LAST:event_btnKillServerActionPerformed

    private void btnExportSettingsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnExportSettingsActionPerformed
        JOptionPane.showMessageDialog(null, "I will export your settings");
        //controller.exportSettings();
    }//GEN-LAST:event_btnExportSettingsActionPerformed

    private void btnImportSettingsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnImportSettingsActionPerformed
        JOptionPane.showMessageDialog(null, "I will import your settings");
        //controller.importSettings();
    }//GEN-LAST:event_btnImportSettingsActionPerformed

    private void btnLaunchServerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnLaunchServerActionPerformed
        //JOptionPane.showMessageDialog(null, "I will launch the server");
        controller.launchServer();
    }//GEN-LAST:event_btnLaunchServerActionPerformed

    public void printError(String error){
        JOptionPane.showMessageDialog(null, error);
    }

    private void sldDebugLevelStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_sldDebugLevelStateChanged
        
    }//GEN-LAST:event_sldDebugLevelStateChanged

    private void chkRandomWorldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkRandomWorldActionPerformed
        setRandomWorld();
    }//GEN-LAST:event_chkRandomWorldActionPerformed

    private void formWindowClosed(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosed

    }//GEN-LAST:event_formWindowClosed

    public void setRandomWorld(boolean isSelected){
        chkRandomWorld.setSelected(isSelected);
        setRandomWorld();
    }

    public void setRandomWorld(boolean isSelected, boolean isEnabled){
        chkRandomWorld.setSelected(isSelected);
        chkRandomWorld.setEnabled(isEnabled);
        setRandomWorld();
    }

    private void setRandomWorld(){
        if(chkRandomWorld.isSelected()){
            cmbMaps.setEnabled(false);
            chkRandomRotateObjects.setEnabled(true);
            chkRandomHeightBuildings.setEnabled(true);
            spnBuildingDensity.setEnabled(true);
            spnWorldSize.setEnabled(true);
        }else{
            cmbMaps.setEnabled(true);
            chkRandomRotateObjects.setEnabled(false);
            chkRandomHeightBuildings.setEnabled(false);
            spnBuildingDensity.setEnabled(false);
            spnWorldSize.setEnabled(false);
        }
    }

    public void serverLaunched(){
        btnLaunchServer.setEnabled(false);
        btnKillServer.setEnabled(true);
    }

    public void serverKilled(){
        btnLaunchServer.setEnabled(true);
        btnKillServer.setEnabled(false);
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnExportSettings;
    private javax.swing.JButton btnImportSettings;
    private javax.swing.JButton btnKillServer;
    private javax.swing.JButton btnLaunchServer;
    private javax.swing.JCheckBox chkAddTeleporters;
    private javax.swing.JCheckBox chkAddTimestampToLog;
    private javax.swing.JCheckBox chkAllBadFlagsOn;
    private javax.swing.JCheckBox chkAllGoodFlagsOn;
    private javax.swing.JCheckBox chkAnnounceTKToAdmins;
    private javax.swing.JCheckBox chkAntidoteFlags;
    private javax.swing.JCheckBox chkAutoTeam;
    private javax.swing.JCheckBox chkDieOnTeamKill;
    private javax.swing.JCheckBox chkDisableBots;
    private javax.swing.JCheckBox chkFilterCallSigns;
    private javax.swing.JCheckBox chkFilterChat;
    private javax.swing.JCheckBox chkFilterChatSimple;
    private javax.swing.JCheckBox chkFlagsOnBuildings;
    private javax.swing.JCheckBox chkJumping;
    private javax.swing.JCheckBox chkMakeServerPrivate;
    private javax.swing.JCheckBox chkManuallyStartTimedGame;
    private javax.swing.JCheckBox chkPrintScoreToConsole;
    private javax.swing.JCheckBox chkQuiteAfterOneGame;
    private javax.swing.JCheckBox chkRandomHeightBuildings;
    private javax.swing.JCheckBox chkRandomRotateObjects;
    private javax.swing.JCheckBox chkRandomWorld;
    private javax.swing.JCheckBox chkRequireUDP;
    private javax.swing.JCheckBox chkRicochet;
    private javax.swing.JCheckBox chkSpawnOnBuilding;
    private javax.swing.JCheckBox chkSyncTimeWithServer;
    private javax.swing.JComboBox cmbGameStyle;
    private javax.swing.JComboBox cmbMaps;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JSeparator jSeparator2;
    private javax.swing.JLabel lblAdminAnnounceLag;
    private javax.swing.JLabel lblAdminPassword;
    private javax.swing.JLabel lblAgility;
    private javax.swing.JLabel lblAnnounceLag;
    private javax.swing.JLabel lblBanAddresses;
    private javax.swing.JLabel lblBlindness;
    private javax.swing.JLabel lblBouncy;
    private javax.swing.JLabel lblBroadcastMessage;
    private javax.swing.JLabel lblBuildingDensity;
    private javax.swing.JLabel lblCloaking;
    private javax.swing.JLabel lblColourBlindness;
    private javax.swing.JLabel lblConfirmAdminPassword;
    private javax.swing.JLabel lblDebugLevel;
    private javax.swing.JLabel lblExtraFlags;
    private javax.swing.JLabel lblForwardOnly;
    private javax.swing.JLabel lblGameStyle;
    private javax.swing.JLabel lblGameTime;
    private javax.swing.JLabel lblGenocide;
    private javax.swing.JLabel lblGoodFlags;
    private javax.swing.JLabel lblGoodFlags1;
    private javax.swing.JLabel lblGuidedMissile;
    private javax.swing.JLabel lblHighSpeed;
    private javax.swing.JLabel lblInertiaX;
    private javax.swing.JLabel lblInertiaY;
    private javax.swing.JLabel lblInvisibleBullet;
    private javax.swing.JLabel lblJamming;
    private javax.swing.JLabel lblJumpingFlag;
    private javax.swing.JLabel lblKickPlayerAfterLag;
    private javax.swing.JLabel lblLaser;
    private javax.swing.JLabel lblLeftTurnOnly;
    private javax.swing.JLabel lblListeningAddress;
    private javax.swing.JLabel lblListeningPort;
    private javax.swing.JLabel lblMachineGun;
    private javax.swing.JLabel lblMap;
    private javax.swing.JLabel lblMaxIdleTime;
    private javax.swing.JLabel lblMaxPlayerScore;
    private javax.swing.JLabel lblMaxPlayers;
    private javax.swing.JLabel lblMaxShots;
    private javax.swing.JLabel lblMaxTeamKills;
    private javax.swing.JLabel lblMaxTeamScore;
    private javax.swing.JLabel lblMomentum;
    private javax.swing.JLabel lblNarrow;
    private javax.swing.JLabel lblNoJumping;
    private javax.swing.JLabel lblNumberOfFlags;
    private javax.swing.JLabel lblObesity;
    private javax.swing.JLabel lblOscillationOverthruster;
    private javax.swing.JLabel lblPathToBadWords;
    private javax.swing.JLabel lblPathToBanFile;
    private javax.swing.JLabel lblPathToGroupDatabase;
    private javax.swing.JLabel lblPathToPIDFile;
    private javax.swing.JLabel lblPathToPasswordDatabase;
    private javax.swing.JLabel lblPathToUserDatabase;
    private javax.swing.JLabel lblPhantomZone;
    private javax.swing.JLabel lblPublicAddress;
    private javax.swing.JLabel lblPublicMessage;
    private javax.swing.JLabel lblQuickTurn;
    private javax.swing.JLabel lblRapiFire;
    private javax.swing.JLabel lblRegisteredGroupName;
    private javax.swing.JLabel lblReverseControlls;
    private javax.swing.JLabel lblReverseOnly;
    private javax.swing.JLabel lblRicochetingFlag;
    private javax.swing.JLabel lblRightTurnOnly;
    private javax.swing.JLabel lblSeer;
    private javax.swing.JLabel lblShield;
    private javax.swing.JLabel lblShockwave;
    private javax.swing.JLabel lblSpamTime;
    private javax.swing.JLabel lblStealth;
    private javax.swing.JLabel lblSteamroller;
    private javax.swing.JLabel lblSuperBullet;
    private javax.swing.JLabel lblTheif;
    private javax.swing.JLabel lblTiny;
    private javax.swing.JLabel lblTriggerHappy;
    private javax.swing.JLabel lblUseless;
    private javax.swing.JLabel lblVersion;
    private javax.swing.JLabel lblWelcomeMessage;
    private javax.swing.JLabel lblWideAngle;
    private javax.swing.JLabel lblWings;
    private javax.swing.JLabel lblWorldSize;
    private javax.swing.JPasswordField passAdminPassword;
    private javax.swing.JPasswordField passConfirmAdminPassword;
    private javax.swing.JSlider sldDebugLevel;
    private javax.swing.JSpinner spnAdminAnnounceLag;
    private javax.swing.JSpinner spnAgility;
    private javax.swing.JSpinner spnAnnounceLag;
    private javax.swing.JSpinner spnBlindness;
    private javax.swing.JSpinner spnBouncy;
    private javax.swing.JSpinner spnBuildingDensity;
    private javax.swing.JSpinner spnCloaking;
    private javax.swing.JSpinner spnColourBlindness;
    private javax.swing.JSpinner spnExtraFlags;
    private javax.swing.JSpinner spnForwardOnly;
    private javax.swing.JSpinner spnGameTime;
    private javax.swing.JSpinner spnGenocide;
    private javax.swing.JSpinner spnGuidedMissile;
    private javax.swing.JSpinner spnHighSpeed;
    private javax.swing.JSpinner spnInertiaX;
    private javax.swing.JSpinner spnInertiaY;
    private javax.swing.JSpinner spnInvisibleBullet;
    private javax.swing.JSpinner spnJamming;
    private javax.swing.JSpinner spnJumpingFlag;
    private javax.swing.JSpinner spnKickPlayerAfterLag;
    private javax.swing.JSpinner spnLaser;
    private javax.swing.JSpinner spnLeftTurnOnly;
    private javax.swing.JSpinner spnMachineGun;
    private javax.swing.JSpinner spnMaxIdleTime;
    private javax.swing.JSpinner spnMaxPlayerScore;
    private javax.swing.JSpinner spnMaxPlayers;
    private javax.swing.JSpinner spnMaxShots;
    private javax.swing.JSpinner spnMaxTeamKills;
    private javax.swing.JSpinner spnMaxTeamScore;
    private javax.swing.JSpinner spnMomentum;
    private javax.swing.JSpinner spnNarrow;
    private javax.swing.JSpinner spnNoJumping;
    private javax.swing.JSpinner spnNumberOfFlags;
    private javax.swing.JSpinner spnObesity;
    private javax.swing.JSpinner spnOscillationOverthruster;
    private javax.swing.JSpinner spnPhantomZone;
    private javax.swing.JSpinner spnQuickturn;
    private javax.swing.JSpinner spnRapidFire;
    private javax.swing.JSpinner spnReverseControlls;
    private javax.swing.JSpinner spnReverseOnly;
    private javax.swing.JSpinner spnRicochetingFlag;
    private javax.swing.JSpinner spnRightTurnOnly;
    private javax.swing.JSpinner spnSeer;
    private javax.swing.JSpinner spnSheild;
    private javax.swing.JSpinner spnShockwave;
    private javax.swing.JSpinner spnSpamTime;
    private javax.swing.JSpinner spnStealth;
    private javax.swing.JSpinner spnSteamroller;
    private javax.swing.JSpinner spnSuperBullet;
    private javax.swing.JSpinner spnTheif;
    private javax.swing.JSpinner spnTiny;
    private javax.swing.JSpinner spnTriggerHappy;
    private javax.swing.JSpinner spnUseless;
    private javax.swing.JSpinner spnWideAngle;
    private javax.swing.JSpinner spnWings;
    private javax.swing.JSpinner spnWorldSize;
    private javax.swing.JTabbedPane tabAllTabs;
    private javax.swing.JPanel tabFlags;
    private javax.swing.JPanel tabGamePlay;
    private javax.swing.JPanel tabServer;
    private javax.swing.JTextField txtBanAddresses;
    private javax.swing.JTextArea txtBroadcastMessage;
    private javax.swing.JTextField txtListeningAddress;
    private javax.swing.JTextField txtListeningPort;
    private javax.swing.JTextField txtPathToBadWords;
    private javax.swing.JTextField txtPathToBanFile;
    private javax.swing.JTextField txtPathToGroupDatabase;
    private javax.swing.JTextField txtPathToPIDFile;
    private javax.swing.JTextField txtPathToPasswordDatabase;
    private javax.swing.JTextField txtPathToUserDatabase;
    private javax.swing.JTextField txtPublicAddress;
    private javax.swing.JTextField txtPublicMessage;
    private javax.swing.JTextField txtRegisteredGroupName;
    private javax.swing.JTextArea txtWelcomeMessage;
    // End of variables declaration//GEN-END:variables

}
